package basic.thread.again;

/**
 * Test
 *
 * @author bingo
 * @create 2018-02-06 17:05
 **/
public class ThreadTest extends Thread {

    public ThreadTest(String name) {
        super(name);
    }

    @Override
    public void run() {

        while(true){
            try {
                Thread.sleep(100);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            System.out.print(Thread.currentThread().getName());
            System.out.println("hello");
        }


    }

    public static void main(String[] args) throws InterruptedException {
        ThreadTest threadTest = new ThreadTest("bin");
        threadTest.start();
        while (true){
            Thread.sleep(100);
            System.out.print(Thread.currentThread().getName());
            System.out.println("word");
        }

    }
}
